package entity

import (
	"gluenet/modules/manager/server/domain/po"
	"gluenet/modules/manager/server/infra"
	"path/filepath"
)

type Area struct {
	infra.Entity `xorm:"-"`
	po.Area      `xorm:"extends"`
	Tags         []*po.Tag `xorm:"-"`
}

func (r *Area) Identity() string {
	return r.AreaID
}

func (r *Area) BuildAgentRepoKey(guid string) string {
	return filepath.ToSlash(filepath.Join(infra.RootKey, r.City, guid))
}
